<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018-10-18
 * Time: 18:13
 */

namespace App\Http\Controllers\Validator;
use Validator;


class ArticleVail
{
    public static function add($params)
    {
        $validator = Validator::make($params, [
            'a_type'          => 'required',
            'a_title'         => 'required',
            'a_content'       => 'required',
        ]);
        if ($validator->fails()) {
            return  false;
        }
        return true;
    }

    public static function edit($params)
    {
        $validator = Validator::make($params, [
            'a_id'            => 'required',
            'a_type'          => 'required',
            'a_title'         => 'required',
            'a_content'       => 'required',
        ]);
        if ($validator->fails()) {
            return  false;
        }
        return true;
    }
    public static function updatestatus($params)
    {
        $validator = Validator::make($params, [
            'a_id'            => 'required',
            'a_status'        => 'required',
        ]);
        if ($validator->fails()) {
            return  false;
        }
        return true;
    }


}